package com.example.partner.service;

import com.example.partner.common.BaseResponse;
import com.example.partner.model.domain.Post;
import com.example.partner.model.dto.UserDTO;
import com.example.partner.model.request.PostAddRequest;
import com.example.partner.model.request.PostCommentAddRequest;
import com.example.partner.model.vo.PostVo;
import com.example.partner.model.vo.ScrollResult;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface PostService{

    @POST("/api/post/add")
    Call<BaseResponse<Long>> savePost(@Body PostAddRequest postAddRequest);
    @GET("/api/post/like")
    Call<BaseResponse<Boolean> >likePost(@Query("id")Long id,@Query("userId")Long userId);
    @GET("/api/post/hot")
    Call<BaseResponse<List<Post>>> queryHotPost(@Query("current")Integer current,@Query("userId")Long userId);
    @GET("/api/post/of/me")
    Call<BaseResponse<List<Post>>> queryMyPost(@Query("current")Integer current,@Query("userId")long userId);
    @GET("api/post/search")
    Call<BaseResponse<PostVo> >queryPostById(@Query("id")Long id,@Query("userId")Long loginId);
    @GET("api/post/of/follow")
    Call<BaseResponse<ScrollResult>> queryPostOfFollow(@Query("max")Long max, @Query("offset")Integer offset,@Query("userId")long userId);
    @POST("/api/post/delete")
    Call<Boolean> deletePost(@Query("id")Long id);
    @POST("/api/post/addComment")
    Call<BaseResponse<Boolean>> addPostComment(@Body PostCommentAddRequest postCommentAddRequest);

}
